//
//  EMMineHeaderView.m
//  EasyMoney
//
//  Created by 邓乐 on 2020/1/11.
//  Copyright © 2020 zh. All rights reserved.
//

#import "EMNavBarView.h"

@interface EMNavBarView ()

@end

@implementation EMNavBarView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.headerLabel = [[UILabel alloc] init];
        self.headerLabel.font = FONT_PINGFANG_MEDIUM_(17);
        self.headerLabel.textColor = ColorFromRGB(0x333333);
        [self addSubview:self.headerLabel];
        [self.headerLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.top.mas_equalTo(EMStatusBarHeight+14);
        }];
        UIView *breaklineView = [[UIView alloc]init];
        breaklineView.backgroundColor = ColorFromRGB(0xf8f8f8);
        [self addSubview:breaklineView];
        [breaklineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(self);
            make.height.mas_equalTo(1);
            make.bottom.mas_equalTo(0);
        }];

    }
    return self;
}

- (void)setTitle:(NSString *)title{
    _title = title;

    self.headerLabel.text = title;
}
@end
